package tid.proyect.md;

import tid.proyect.models.CameraMode;
import tid.proyect.test.TestAplication;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

public class main extends Activity {
	/** Called when the activity is first created. */
	Context c;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		c = this;
		Toast.makeText(main.this, "hola soy coco!", Toast.LENGTH_LONG).show();
		setContentView(R.layout.home);

		final Button buttonCamera = (Button) findViewById(R.id.cameraButton);
		buttonCamera.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View v) {
				startActivity(new Intent(c, CameraMode.class));
			}
		});

		final Button buttonGallery = (Button) findViewById(R.id.searchButton);
		buttonGallery.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View v) {
				startActivity(new Intent("tid.proyect.models.OpenImage"));
			}
		});

		final Button buttonTest = (Button) findViewById(R.id.testButton);
		buttonGallery.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View v) {
				startActivity(new Intent("tid.proyect.test.TestAplication"));
			}
		});

	}
}